﻿<Window x:Class="PM.UI.BugManager.BugMainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Bug跟踪管理系统" Height="318" Width="507" WindowStartupLocation="CenterScreen" WindowState="Maximized" WindowStyle="ToolWindow">
    <Window.Background>
        <ImageBrush ImageSource="/PM.UI;Component/Images/BackGroundImage.png"></ImageBrush>
    </Window.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <StackPanel Orientation="Horizontal">
            <TextBlock TextAlignment="Left" Margin="10,0,0,0" Foreground="White"  VerticalAlignment="Center"> 欢迎 XXX 登陆 目前参与XX个项目 </TextBlock>
                <TextBlock TextAlignment="Left" Margin="10,0,0,0" Foreground="White"  VerticalAlignment="Center" > 我的团队</TextBlock>
                <TextBlock TextAlignment="Left" Margin="10,0,0,0" Foreground="White" VerticalAlignment="Center"> 个人资料</TextBlock>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1">
            <StackPanel Orientation="Horizontal">
                <Image Source="/PM.UI;Component/Images/project.png" Height="48" Width="48" Margin="10,0,0,0" HorizontalAlignment="Left"></Image>
                <TextBlock TextAlignment="Left" Margin="10,0,0,0" FontSize="16" Foreground="White"  VerticalAlignment="Center"> 项目信息</TextBlock>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="2">
           <StackPanel Orientation="Vertical">
                <TextBlock TextAlignment="Left" Margin="10,10,0,0" FontSize="16" Foreground="White"  VerticalAlignment="Center"> 所有项目</TextBlock>
                <DataGrid Name="BugDataGridView" RowHeaderWidth="27" AutoGenerateColumns="False" ColumnHeaderHeight="30" RowHeight="27" IsReadOnly="True" HorizontalGridLinesBrush="Cyan" 
                                 VerticalGridLinesBrush="#FFE0EAF6" BorderBrush="AliceBlue"  HeadersVisibility="Column" Background="Transparent"
                                FontFamily="微软雅黑" FontSize="14"   SelectionUnit="FullRow" SelectionMode="Single" SelectionChanged="DeductionDataGridView_SelectionChanged" Opacity="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="None" >
                    <!--给整个表单元格添加颜色开始-->
                    <DataGrid.CellStyle>
                        <Style TargetType="DataGridCell">
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="Background" Value="SkyBlue"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </DataGrid.CellStyle>
                    <!--给整个表单元格添加颜色结束-->

                    <!--给整个表行添加颜色开始-->
                    <DataGrid.RowStyle >
                        <Style TargetType="DataGridRow">
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="Foreground" Value="White"/>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <!--当鼠标经过时 改变颜色-->
                                    <!--<Setter Property="Background" Value="SkyBlue"/>-->
                                    <Setter Property="Foreground" Value="SkyBlue"/>
                                </Trigger>
                                <Trigger Property="IsSelected" Value="True">
                                    <!--<Setter Property="Background" Value="LightGray"/>-->
                                    <Setter Property="Foreground" Value="Red"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </DataGrid.RowStyle>
                    <!--给整个表行添加颜色结束-->

                    <!--给整个表头添加颜色开始-->
                    <DataGrid.ColumnHeaderStyle>
                        <Style TargetType="DataGridColumnHeader">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/PM.UI;Component/Images/Deduction-12.png"></ImageBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="White"/>
                            <Setter Property="FontSize" Value="14" />
                            <Setter Property="FontFamily" Value="微软雅黑"/>
                            <Setter Property="HorizontalContentAlignment" Value="Center" />
                        </Style>
                    </DataGrid.ColumnHeaderStyle>
                    <!--给整个表头添加颜色结束-->

                    <DataGrid.Columns>
                        <DataGridTextColumn Header=""  MinWidth="20" />
                        <DataGridTextColumn Header="项目名称" MinWidth="60" Binding="{Binding ID}"/>
                        <DataGridTextColumn Header="加入日期" MinWidth="120" Binding="{Binding QuestionType}"/>
                        <DataGridTextColumn Header="是否创建者" MinWidth="240" Binding="{Binding QuestionTitle}"/>
                        <DataGridTextColumn Header="是否管理员" MinWidth="120" Binding="{Binding Stage}"/>
                        <DataGridTextColumn Header="管理项目" MinWidth="100" Binding="{Binding StateName}" />
                        <DataGridTextColumn Header="退出" MinWidth="100" Binding="{Binding StateName}" />
                    </DataGrid.Columns>
                    </DataGrid>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="3">
            <TextBlock TextAlignment="Left" Margin="10,0,0,0" FontSize="16" Foreground="White"  VerticalAlignment="Center"> 项目汇总信息</TextBlock>
        </Grid>
    </Grid>
</Window>
